/**
 * 
 */
package com.faxsun.core.pojos.enums;

/**
 * 文章类型枚举
 * 
 * @author songdragon
 *
 */
public enum PostType {

	EVALUATION(0), INFO(1), INVALID(13);
	private int type;

	PostType(int type) {
		this.type = type;
	}

	public static PostType parse(Integer type) {
		if (type == null) {
			return INVALID;
		}
		switch (type) {
		case 0:
			return EVALUATION;

		case 1:
			return INFO;
		}
		return INVALID;
	}

	public static int getIntValue(PostType postType) {
		return postType.type;
	}

	public int getValue() {
		return type;
	}
}
